/**
 * IndexAction.java 2015年12月14日 下午6:33:12
 *
 * Copyright (c) 2010-2061 leying.com, Inc. All rights reserved.
 *
 * @Description TODO
 * @version 3.0
 *
 */
package com.xiake.cms.web.action.back;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.xiake.core.entity.manager.Menu;
import com.xiake.service.manager.ManageService;


@Controller
@RequestMapping()
public class MainController {
	@Autowired
	private ManageService manageService;

  @RequestMapping(value = "index")
  public String index() {

    return "back/index";
  }
  
  @RequestMapping(value="menu")
  public String menu(ModelMap map) throws Exception{
	  List<Menu> menus = manageService.findMenuByRoleId(1);
	  map.put("menus", menus);
	  return "back/commons/menu";
  }
}
